3.227 \(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{(a+a \sec (e+f x))^3} \, dx\)

Optimal. Leaf size=205 \[ \frac {\tan (e+f x) \left (2 c^4+8 c^3 d-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)+21 c^2 d^2-88 c d^3+72 d^4\right )}{15 f \left (a^3 \sec (e+f x)+a^3\right )}+\frac {d^3 (4 c-3 d) \tanh ^{-1}(\sin (e+f x))}{a^3 f}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^3}{5 f (a \sec (e+f x)+a)^3}+\frac {(c-d) (2 c+9 d) \tan (e+f x) (c+d \sec (e+f x))^2}{15 a f (a \sec (e+f x)+a)^2} \]

[Out]

(4*c-3*d)*d^3*arctanh(sin(f*x+e))/a^3/f+1/15*(c-d)*(2*c+9*d)*(c+d*sec(f*x+e))^2*tan(f*x+e)/a/f/(a+a*sec(f*x+e)
)^2+1/5*(c-d)*(c+d*sec(f*x+e))^3*tan(f*x+e)/f/(a+a*sec(f*x+e))^3+1/15*(2*c^4+8*c^3*d+21*c^2*d^2-88*c*d^3+72*d^
4-d^2*(2*c^2+10*c*d-27*d^2)*sec(f*x+e))*tan(f*x+e)/f/(a^3+a^3*sec(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.28, antiderivative size = 265, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3987, 98, 150, 143, 63, 217, 203} \[ \frac {\tan (e+f x) \left (-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)+21 c^2 d^2+8 c^3 d+2 c^4-88 c d^3+72 d^4\right )}{15 f \left (a^3 \sec (e+f x)+a^3\right )}+\frac {2 d^3 (4 c-3 d) \tan (e+f x) \tan ^{-1}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^3}{5 f (a \sec (e+f x)+a)^3}+\frac {(c-d) (2 c+9 d) \tan (e+f x) (c+d \sec (e+f x))^2}{15 a f (a \sec (e+f x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^4)/(a + a*Sec[e + f*x])^3,x]

[Out]

(2*(4*c - 3*d)*d^3*ArcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a*(1 + Sec[e + f*x])]]*Tan[e + f*x])/(a^2*f*Sqrt[a - a
*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) + ((c - d)*(2*c + 9*d)*(c + d*Sec[e + f*x])^2*Tan[e + f*x])/(15*a*f*(
a + a*Sec[e + f*x])^2) + ((c - d)*(c + d*Sec[e + f*x])^3*Tan[e + f*x])/(5*f*(a + a*Sec[e + f*x])^3) + ((2*c^4
+ 8*c^3*d + 21*c^2*d^2 - 88*c*d^3 + 72*d^4 - d^2*(2*c^2 + 10*c*d - 27*d^2)*Sec[e + f*x])*Tan[e + f*x])/(15*f*(
a^3 + a^3*Sec[e + f*x]))

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 98

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((b*c -
 a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^(p + 1))/(b*(b*e - a*f)*(m + 1)), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 143

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol] :
> Simp[((b^2*d*e*g - a^2*d*f*h*m - a*b*(d*(f*g + e*h) - c*f*h*(m + 1)) + b*f*h*(b*c - a*d)*(m + 1)*x)*(a + b*x
)^(m + 1)*(c + d*x)^(n + 1))/(b^2*d*(b*c - a*d)*(m + 1)), x] + Dist[(a*d*f*h*m + b*(d*(f*g + e*h) - c*f*h*(m +
 2)))/(b^2*d), Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && EqQ[m
+ n + 2, 0] && NeQ[m, -1] &&  !(SumSimplerQ[n, 1] &&  !SumSimplerQ[m, 1])

Rule 150

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[((b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^(p + 1))/(b*(b*e - a*f)*(m + 1)), x] - Dist[1
/(b*(b*e - a*f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b*c*(f*g - e*h)*(m + 1) + (
b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h)*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; Free
Q[{a, b, c, d, e, f, g, h, p}, x] && LtQ[m, -1] && GtQ[n, 0] && IntegersQ[2*m, 2*n, 2*p]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{(a+a \sec (e+f x))^3} \, dx &=-\frac {\left (a^2 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {(c+d x)^4}{\sqrt {a-a x} (a+a x)^{7/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {(c+d x)^2 \left (-a^2 \left (2 c^2+6 c d-3 d^2\right )+a^2 (c-6 d) d x\right )}{\sqrt {a-a x} (a+a x)^{5/2}} \, dx,x,\sec (e+f x)\right )}{5 a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (2 c+9 d) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {(c+d x) \left (-a^4 \left (2 c^3+8 c^2 d+23 c d^2-18 d^3\right )+a^4 d \left (2 c^2+10 c d-27 d^2\right ) x\right )}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{15 a^4 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (2 c+9 d) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\left (2 c^4+8 c^3 d+21 c^2 d^2-88 c d^3+72 d^4-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}-\frac {\left ((4 c-3 d) d^3 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (2 c+9 d) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\left (2 c^4+8 c^3 d+21 c^2 d^2-88 c d^3+72 d^4-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {\left (2 (4 c-3 d) d^3 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (2 c+9 d) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\left (2 c^4+8 c^3 d+21 c^2 d^2-88 c d^3+72 d^4-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {\left (2 (4 c-3 d) d^3 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {2 (4 c-3 d) d^3 \tan ^{-1}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {(c-d) (2 c+9 d) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\left (2 c^4+8 c^3 d+21 c^2 d^2-88 c d^3+72 d^4-d^2 \left (2 c^2+10 c d-27 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.39, size = 292, normalized size = 1.42 \[ \frac {2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (4 (c-d)^2 \left (7 c^2+26 c d+57 d^2\right ) \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right ) \cos ^4\left (\frac {1}{2} (e+f x)\right )-60 d^3 \cos ^5\left (\frac {1}{2} (e+f x)\right ) \left ((4 c-3 d) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )\right )-d \sec (e) \sin (f x) \sec (e+f x)\right )-8 (c-d)^3 (2 c+3 d) \tan \left (\frac {e}{2}\right ) \cos ^3\left (\frac {1}{2} (e+f x)\right )+3 (c-d)^4 \tan \left (\frac {e}{2}\right ) \cos \left (\frac {1}{2} (e+f x)\right )+3 (c-d)^4 \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right )-8 (c-d)^3 (2 c+3 d) \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right ) \cos ^2\left (\frac {1}{2} (e+f x)\right )\right )}{15 a^3 f (\cos (e+f x)+1)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^4)/(a + a*Sec[e + f*x])^3,x]

[Out]

(2*Cos[(e + f*x)/2]*(3*(c - d)^4*Sec[e/2]*Sin[(f*x)/2] - 8*(c - d)^3*(2*c + 3*d)*Cos[(e + f*x)/2]^2*Sec[e/2]*S
in[(f*x)/2] + 4*(c - d)^2*(7*c^2 + 26*c*d + 57*d^2)*Cos[(e + f*x)/2]^4*Sec[e/2]*Sin[(f*x)/2] - 60*d^3*Cos[(e +
 f*x)/2]^5*((4*c - 3*d)*(Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]])
- d*Sec[e]*Sec[e + f*x]*Sin[f*x]) + 3*(c - d)^4*Cos[(e + f*x)/2]*Tan[e/2] - 8*(c - d)^3*(2*c + 3*d)*Cos[(e + f
*x)/2]^3*Tan[e/2]))/(15*a^3*f*(1 + Cos[e + f*x])^3)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 385, normalized size = 1.88 \[ \frac {15 \, {\left ({\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left ({\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (4 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (15 \, d^{4} + {\left (7 \, c^{4} + 12 \, c^{3} d + 12 \, c^{2} d^{2} - 88 \, c d^{3} + 72 \, d^{4}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (2 \, c^{4} + 12 \, c^{3} d + 12 \, c^{2} d^{2} - 68 \, c d^{3} + 57 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, c^{4} + 12 \, c^{3} d + 42 \, c^{2} d^{2} - 128 \, c d^{3} + 117 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{30 \, {\left (a^{3} f \cos \left (f x + e\right )^{4} + 3 \, a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} + a^{3} f \cos \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

1/30*(15*((4*c*d^3 - 3*d^4)*cos(f*x + e)^4 + 3*(4*c*d^3 - 3*d^4)*cos(f*x + e)^3 + 3*(4*c*d^3 - 3*d^4)*cos(f*x
+ e)^2 + (4*c*d^3 - 3*d^4)*cos(f*x + e))*log(sin(f*x + e) + 1) - 15*((4*c*d^3 - 3*d^4)*cos(f*x + e)^4 + 3*(4*c
*d^3 - 3*d^4)*cos(f*x + e)^3 + 3*(4*c*d^3 - 3*d^4)*cos(f*x + e)^2 + (4*c*d^3 - 3*d^4)*cos(f*x + e))*log(-sin(f
*x + e) + 1) + 2*(15*d^4 + (7*c^4 + 12*c^3*d + 12*c^2*d^2 - 88*c*d^3 + 72*d^4)*cos(f*x + e)^3 + 3*(2*c^4 + 12*
c^3*d + 12*c^2*d^2 - 68*c*d^3 + 57*d^4)*cos(f*x + e)^2 + (2*c^4 + 12*c^3*d + 42*c^2*d^2 - 128*c*d^3 + 117*d^4)
*cos(f*x + e))*sin(f*x + e))/(a^3*f*cos(f*x + e)^4 + 3*a^3*f*cos(f*x + e)^3 + 3*a^3*f*cos(f*x + e)^2 + a^3*f*c
os(f*x + e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e))^3,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)2/f*((4096/5*tan((f*x+exp(1))/2)^5*c^4*a^12-16384/5*tan((f*x+e
xp(1))/2)^5*c^3*a^12*d+24576/5*tan((f*x+exp(1))/2)^5*c^2*a^12*d^2-16384/5*tan((f*x+exp(1))/2)^5*c*a^12*d^3+409
6/5*tan((f*x+exp(1))/2)^5*a^12*d^4-8192/3*tan((f*x+exp(1))/2)^3*c^4*a^12+16384*tan((f*x+exp(1))/2)^3*c^2*a^12*
d^2-65536/3*tan((f*x+exp(1))/2)^3*c*a^12*d^3+8192*tan((f*x+exp(1))/2)^3*a^12*d^4+4096*tan((f*x+exp(1))/2)*c^4*
a^12+16384*tan((f*x+exp(1))/2)*c^3*a^12*d+24576*tan((f*x+exp(1))/2)*c^2*a^12*d^2-114688*tan((f*x+exp(1))/2)*c*
a^12*d^3+69632*tan((f*x+exp(1))/2)*a^12*d^4)*1/32768/a^15-tan((f*x+exp(1))/2)*d^4/a^3/(tan((f*x+exp(1))/2)^2-1
)-(4*c*d^3-3*d^4)*1/2/a^3*ln(abs(tan((f*x+exp(1))/2)-1))+(4*c*d^3-3*d^4)*1/2/a^3*ln(abs(tan((f*x+exp(1))/2)+1)
))

________________________________________________________________________________________

maple [B]  time = 0.71, size = 454, normalized size = 2.21 \[ \frac {\left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c^{4}}{20 f \,a^{3}}-\frac {\left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c^{3} d}{5 f \,a^{3}}+\frac {3 \left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c^{2} d^{2}}{10 f \,a^{3}}-\frac {\left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c \,d^{3}}{5 f \,a^{3}}+\frac {\left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) d^{4}}{20 f \,a^{3}}-\frac {\left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c^{4}}{6 f \,a^{3}}+\frac {\left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c^{2} d^{2}}{f \,a^{3}}-\frac {4 \left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c \,d^{3}}{3 f \,a^{3}}+\frac {\left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) d^{4}}{2 f \,a^{3}}+\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c^{4}}{4 f \,a^{3}}+\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c^{3} d}{f \,a^{3}}+\frac {3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c^{2} d^{2}}{2 f \,a^{3}}-\frac {7 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c \,d^{3}}{f \,a^{3}}+\frac {17 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) d^{4}}{4 f \,a^{3}}-\frac {d^{4}}{f \,a^{3} \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}-\frac {4 d^{3} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right ) c}{f \,a^{3}}+\frac {3 d^{4} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}{f \,a^{3}}-\frac {d^{4}}{f \,a^{3} \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}+\frac {4 d^{3} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right ) c}{f \,a^{3}}-\frac {3 d^{4} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}{f \,a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e))^3,x)

[Out]

1/20/f/a^3*tan(1/2*e+1/2*f*x)^5*c^4-1/5/f/a^3*tan(1/2*e+1/2*f*x)^5*c^3*d+3/10/f/a^3*tan(1/2*e+1/2*f*x)^5*c^2*d
^2-1/5/f/a^3*tan(1/2*e+1/2*f*x)^5*c*d^3+1/20/f/a^3*tan(1/2*e+1/2*f*x)^5*d^4-1/6/f/a^3*tan(1/2*e+1/2*f*x)^3*c^4
+1/f/a^3*tan(1/2*e+1/2*f*x)^3*c^2*d^2-4/3/f/a^3*tan(1/2*e+1/2*f*x)^3*c*d^3+1/2/f/a^3*tan(1/2*e+1/2*f*x)^3*d^4+
1/4/f/a^3*tan(1/2*e+1/2*f*x)*c^4+1/f/a^3*tan(1/2*e+1/2*f*x)*c^3*d+3/2/f/a^3*tan(1/2*e+1/2*f*x)*c^2*d^2-7/f/a^3
*tan(1/2*e+1/2*f*x)*c*d^3+17/4/f/a^3*tan(1/2*e+1/2*f*x)*d^4-1/f/a^3*d^4/(tan(1/2*e+1/2*f*x)-1)-4/f/a^3*d^3*ln(
tan(1/2*e+1/2*f*x)-1)*c+3/f/a^3*d^4*ln(tan(1/2*e+1/2*f*x)-1)-1/f/a^3*d^4/(tan(1/2*e+1/2*f*x)+1)+4/f/a^3*d^3*ln
(tan(1/2*e+1/2*f*x)+1)*c-3/f/a^3*d^4*ln(tan(1/2*e+1/2*f*x)+1)

________________________________________________________________________________________

maxima [B]  time = 0.36, size = 475, normalized size = 2.32 \[ \frac {3 \, d^{4} {\left (\frac {40 \, \sin \left (f x + e\right )}{{\left (a^{3} - \frac {a^{3} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{3}}\right )} - 4 \, c d^{3} {\left (\frac {\frac {105 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {20 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{3}}\right )} + \frac {6 \, c^{2} d^{2} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} + \frac {c^{4} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} + \frac {12 \, c^{3} d {\left (\frac {5 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

1/60*(3*d^4*(40*sin(f*x + e)/((a^3 - a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)) + (85*sin(f*
x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3
- 60*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 60*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a^3) - 4*c*d^3
*((105*sin(f*x + e)/(cos(f*x + e) + 1) + 20*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^5/(cos(f*x +
e) + 1)^5)/a^3 - 60*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 60*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)
/a^3) + 6*c^2*d^2*(15*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e
)^5/(cos(f*x + e) + 1)^5)/a^3 + c^4*(15*sin(f*x + e)/(cos(f*x + e) + 1) - 10*sin(f*x + e)^3/(cos(f*x + e) + 1)
^3 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 + 12*c^3*d*(5*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^5
/(cos(f*x + e) + 1)^5)/a^3)/f

________________________________________________________________________________________

mupad [B]  time = 1.82, size = 195, normalized size = 0.95 \[ \frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {3\,{\left (c-d\right )}^4}{4\,a^3}+\frac {3\,{\left (c^2-d^2\right )}^2}{2\,a^3}-\frac {2\,\left (c+d\right )\,{\left (c-d\right )}^3}{a^3}\right )}{f}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {{\left (c-d\right )}^4}{6\,a^3}-\frac {\left (c+d\right )\,{\left (c-d\right )}^3}{3\,a^3}\right )}{f}-\frac {2\,d^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^3\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,{\left (c-d\right )}^4}{20\,a^3\,f}+\frac {2\,d^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (4\,c-3\,d\right )}{a^3\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d/cos(e + f*x))^4/(cos(e + f*x)*(a + a/cos(e + f*x))^3),x)

[Out]

(tan(e/2 + (f*x)/2)*((3*(c - d)^4)/(4*a^3) + (3*(c^2 - d^2)^2)/(2*a^3) - (2*(c + d)*(c - d)^3)/a^3))/f + (tan(
e/2 + (f*x)/2)^3*((c - d)^4/(6*a^3) - ((c + d)*(c - d)^3)/(3*a^3)))/f - (2*d^4*tan(e/2 + (f*x)/2))/(f*(a^3*tan
(e/2 + (f*x)/2)^2 - a^3)) + (tan(e/2 + (f*x)/2)^5*(c - d)^4)/(20*a^3*f) + (2*d^3*atanh(tan(e/2 + (f*x)/2))*(4*
c - 3*d))/(a^3*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {c^{4} \sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{4} \sec ^{5}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {6 c^{2} d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c^{3} d \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx}{a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))**4/(a+a*sec(f*x+e))**3,x)

[Out]

(Integral(c**4*sec(e + f*x)/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(d**4*sec
(e + f*x)**5/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(4*c*d**3*sec(e + f*x)**
4/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(6*c**2*d**2*sec(e + f*x)**3/(sec(e
 + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(4*c**3*d*sec(e + f*x)**2/(sec(e + f*x)**3
+ 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x))/a**3

________________________________________________________________________________________